<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2023-02-07 14:03:12
 * @Last Modified time: 2023-02-23 15:47:45
 */
namespace app\sys\controller\user;

use app\sys\controller\Base;
use think\facade\{
    App
};
use app\common\services\user\UserWaterService;
/**
 * 用户流水
 * Class UserWater 
 * @package app\sys\controller\user
 */
class UserWater extends Base
{
    /**
     * UserWater constructor.
     * @param App $app
     */
    public function __construct(App $app,UserWaterService $service)
    {
        parent::__construct($app);
        $this->service = $service;
    }

    /**
     * 用户列表
     * @noAuth(true)
     * @method(GET)
     */
    public function list()
    {
        if (!$id = $this->request->param('id')) {
            $this->error('参数错误!');
        }
        $param = $this->request->getMore([]);
        $this->success($this->service->getUserWaterListByUid($id,$param));
    }
}
